// ml:run = $bin < input
#include <iostream>
#include <vector>
#include <algorithm>

std::vector<int> a(3);

int main()
{
    std::ios_base::sync_with_stdio(false);
    for (int i = 0; i < 3; i++) std::cin >> a[i];
    std::sort(a.begin(), a.end());
    std::cout << a[1] - a[0] + a[2] - a[1] << "\n";
}

